<?php
/**
 * Created by PhpStorm.
 * User: zhangxilu
 * Date: 2017/12/24
 * Time: 下午9:50
 */

namespace common\logic;


use common\models\RentingTypeImageModel;
use yii\db\ActiveQuery;

class RentingTypeImageLogic extends Logic
{

    /**
     * @return ActiveQuery
     */
    protected function _getActiveQuery()
    {
        return RentingTypeImageModel::find();
    }

    public function save(RentingTypeImageModel $model){
        return $model->save();
    }

    /**
     * @param $houseId
     *
     * @return array|RentingTypeImageModel[]
     */
    public function getAll($houseId){
        return $this->_all(['house_id'=>$houseId]);
    }
}